<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>编辑文章</title>
    <link rel="stylesheet" th:href="@{/css/bootstrap.css}"></link>
</head>

<body class="container" style="width: 70%;">

<div th:replace="layout/header :: header"></div>

<form role="form" th:action="@{/newArticle}" method="post">
    <input type="hidden" name="userId" th:value="${userId}">
    <div class="form-group">
    <label for="article_title">文章标题</label>
    <input type="text" class="form-control" id="article_title" name="title">
</div>

    <div class="form-group">
        <label for="article_content">文章内容</label>
        <textarea style="resize: vertical;" class="form-control" rows="20" id="article_content" name="content"></textarea>
    </div>

    <div class="form-group">
        <label   class="col-sm-2 control-label"></label>
        <div class="col-sm-6">
            <div th:if="${errorMsg != null}"  class="alert alert-danger" role="alert" th:text="${errorMsg}">

            </div>
        </div>
    </div>

    <div class="form-group">
        <div class="col-sm-6">
            <input type="submit" value="发布" class="btn btn-info" />
        </div>
    </div>
</form>
</body>
</html>